OCR Xpress for Linux - Updated
Basic Usage
User Guide > How To > Basic Usage

OCR Xpress for Linux makes it very easy to create a full page OCR application. For the basics, there are two ways to produce searchable text documents from images; generate a PDF file and generate a TXT file. In addition, text in memory can be generated for the OCR Xpress internal data.

  1. Load a BMP file: All three processes require that the image be loaded first
    Copy Code
    #include "ocrxpress.h"
    …
    intptr_t dib = 0;
    OCRX_Status status;
    …
    status = OCRX_load_file("FilePathOfImageToOCR.bmp", &dib);
    if(status.status_code == OCRX_StatusCode_Error)
    {
        // report error here
        // terminate process
    }
    
  1. After an Image has been loaded it may be processed in one of three ways.

  1. Free memory occupied by loaded DIB
    Copy Code
    ...
    status = OCRX_free_dib(dib);
    if(status.status_code == OCRX_StatusCode_Error)
    {
    // report error here
    // terminate process
    }